package com.bit.mybatis.demo.mapper;

import com.bit.mybatis.demo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleInfoMapper {

    @Select("select ta.*, tb.username, tb.age from article_info ta " +
            "left join user_info tb on ta.uid = tb.id " +
            "where ta.id= #{id}")
    ArticleInfo queryArticleInfo(Integer id);
}
